#ifndef MVC8_H_46d4b4e5_50a1_4b25_ae2e_a8712917eb01
#define MVC8_H_46d4b4e5_50a1_4b25_ae2e_a8712917eb01

/*
**
** Copyright (c) 2010 by Lorimark Solutions, LLC.
** All Rights Reserved.
** Send inquiries to: info@lorimarksolutions.com
**
*/

#include <evie-systems.h>

/*!
** \brief Sensor Voltage 8-Cell
**
** This module defines all of the data structures in use in the
**  Sensor-Voltage-8-Channel module.
**
*/

/*!
** \brief Sensor Input Values
**
**
*/
typedef struct
{
  uint8  status;
  sint16 value;
  sint16 min;
  sint16 max;

} mvc8_analog_t;

typedef struct
{
  /*!
  ** Raw Sensor Data
  **
  */
  mvc8_analog_t raw;

  /*!
  ** Scaled Sensor Data. This has the calibration correction curve
  **  applied to the raw data.
  **
  */
  mvc8_analog_t scaled;

  /*!
  ** P.I.D.R Sensor Data.  This result contains the PID result as it
  **  is applied to the scaled input.
  **
  */
//  sint16 pidr;

} mvc8_siv_t;

/*!
** \brief Scale Conversion
**
*/
typedef struct
{
  sint16 lo;
  sint16 hi;
} mvc8_scale_t;

typedef struct
{
  sint16 p;
  sint16 i;
  sint16 d;
  sint16 r;
} mvc8_pidr_t;

/*!
** \brief A/D Channel Definition
**
**
*/
typedef struct
{
  uint16       config;
  mvc8_scale_t in;
  mvc8_scale_t out;
  sint16       min;
  sint16       max;
  mvc8_pidr_t  pidr;
} mvc8_ad_t;

typedef struct
{
  uint8      status;
  mvc8_siv_t temperature;
  mvc8_siv_t voltage[8];

} mvc8_ram_table_t;

typedef struct
{
  mvc8_ad_t ad[8];

} mvc8_rom_table_t;

typedef struct
{
} mvc8_packet_t;

#endif // #ifndef SVC8_H_46d4b4e5_50a1_4b25_ae2e_a8712917eb01

